<?php get_header(); ?>





<?php if (have_posts()) : while (have_posts()) : the_post(); ?>



    <?php
    $categories = get_the_category();

    $categoryIDS = array();

    foreach ($categories as $category) {
      array_push($categoryIDS, $category->term_id);
    }

    $categoryIDS = implode(",", $categoryIDS);

    ?>


    <div class="top">
      <div class="main">
        <div class="topbox topnewsbox">
          <p><?php the_title(); ?></p>
        </div>
      </div>
    </div>

    <div class="postbox">
      <div class="main">
        <div class="postboxs">


          <div class="postboxsmain">
            <div class="newsboxsbt">By / <?php   
$post_date = strtotime(get_the_time('Y-m-d H:i:s'));  
$post_month = date('F', $post_date);  
echo $post_month;  
?> <?php the_time('j'); ?>, <?php the_time('Y'); ?></div>
            <div class="postboxsnr">
              <?php the_content(""); ?>
              <br /><br />
            </div>
          </div>

          <div class="clear"></div>
          <div class="fy">


            <?php



            $next_post = get_next_post($categoryIDS);



            if (!empty($next_post)) : ?>
              <a href="<?php echo get_permalink($next_post->ID); ?>"><i class="fyl"></i><span>Previous Product</span></a>
              <script language="javascript">
                psUtl.bindKey(['LEFT'], function() {
                  location = '<?php echo get_permalink($next_post->ID); ?>';
                })
              </script>
			   <em></em>
            <?php endif; ?>




            <?php
            $prev_post = get_previous_post($categoryIDS);
            if (!empty($prev_post)) : ?>
             
              <a href="<?php echo get_permalink($prev_post->ID); ?>" class="page_next "><span>Next Product</span><i class="fyr"></i></a>
              <script language="javascript">
                psUtl.bindKey(['RIGHT'], function() {
                  location = '<?php echo get_permalink($prev_post->ID); ?>';
                })
              </script>

            <?php endif; ?>






            <div class="clear"></div>
          </div>
          <div class="clear"></div>

        </div>


      </div>
    </div>



    <div class="clear"></div>















    <?php endwhile;
else : ?><?php endif; ?>



    <?php get_footer(); ?>